<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    // $router->get('/', 'HomeController@index')->name('admin.home');
    $router->get('/', function () {
        return redirect('/admin/users');
    });

    $router->resource('/users', UserController::class); //用户管理
    $router->resource('/todayUsers', TodayUserController::class); //今日新增用户

    $router->resource('/wallet', WalletController::class); //用户钱包

    $router->resource('/recharge', RechargeController::class); //充值管理
    $router->resource('/rechargeLog', RechargeLogController::class); //充值记录

    $router->post('/withdraw/success', 'WithdrawController@success'); //提现成功
    $router->post('/withdraw/failed', 'WithdrawController@failed'); //提现失败

    $router->resource('/withdraw', WithdrawController::class); //提现管理

    $router->resource('/powertype', PowerTypeController::class); //算力类型
    $router->resource('/powerlog', PowerLogController::class); //算力记录

    $router->get('rentClothDetail', 'RentClothController@rentClothDetail'); //租衣详情
    $router->get('rentClothAddress', 'RentClothLineController@rentClothAddress'); //租衣详情
    $router->resource('rentcloths', RentClothController::class); //线下租衣管理
    $router->post('/rentclothline/sendOrder', 'RentClothLineController@sendOrder'); //填写物流信息
    $router->post('/rentclothline/confirmOrder', 'RentClothLineController@confirmOrder'); //填写物流信息
    $router->resource('rentclothline', RentClothLineController::class); //线上租衣管理
    $router->resource('rentclothbuy', RentClothBuyController::class); //线上换购管理
    //晒单
    $router->post('/rentclothorder/success', 'RentClothOrderController@success'); //审核成功
    $router->post('/rentclothorder/failed', 'RentClothOrderController@failed'); //审核失败
    $router->resource('rentclothorders', RentClothOrderController::class); //租衣晒单管理
    $router->post('/rentclothorderline/success', 'RentClothOrderLineController@success'); //审核成功
    $router->resource('rentclothlineorders', RentClothOrderLineController::class); //租衣晒单管理

    $router->any('/commodities/comList', 'CommodityController@comList');
    $router->any('/commodities/attrList', 'CommodityController@attrList');
    $router->resource('commodities', CommodityController::class); //商品管理
    $router->any('/commoditytype/get_commodity_type_list', 'CommodityTypeController@get_commodity_type_list');
    $router->resource('commoditytypes', CommodityTypeController::class);

    $router->any('/brands/get_brand_list', 'BrandController@get_brand_list');
    $router->any('/brands/get_brand', 'BrandController@get_brand');
    $router->resource('brands', BrandController::class); //品牌管理
    $router->any('/brandtypes/get_brand_type_list', 'BrandTypeController@get_brand_type_list');
    $router->resource('brandtypes', BrandTypeController::class); //品牌类型管理

    $router->resource('/currency', CurrencyController::class); //币种管理

    $router->resource('/message', MessageController::class); //币种管理

    $router->get('/shopdetail/{id}', 'ShopController@shopdetail'); //店铺详情
    $router->any('/shop/shopList', 'ShopController@shopList'); //店铺管理
    $router->resource('/shop', ShopController::class); //店铺管理
    $router->post('/shop/success', 'ShopNewController@success'); //审核成功管理
    $router->post('/shop/failed', 'ShopNewController@failed'); //审核失败管理
    $router->resource('/newshop', ShopNewController::class); //店铺众筹申请
    $router->resource('shoproles', ShopRoleController::class); //店铺竞选

    $router->get('/delcom/{id}', 'ShopComController@delcom'); //删除店铺商品
    $router->resource('shopcoms', ShopComController::class);

    $router->resource('orders', OrderController::class);
    $router->resource('yzorders', OrderYzController::class);
    $router->resource('hgorders', OrderHgController::class);

    $router->any('/notice/sendNotice', 'NoticeController@sendNotice'); //公告类型
    $router->resource('/notice', NoticeController::class); //公告管理
    $router->any('/noticetype/get_type_list', 'NoticeTypeController@get_type_list'); //公告类型
    $router->resource('/noticetype', NoticeTypeController::class); //公告类型管理

    $router->resource('setting', SettingController::class);
    $router->resource('/configs', ConfigController::class); //系统文字配置
    $router->resource('/ImgConfigs', ConfigImgController::class); //系统图片配置

    $router->resource('deals', DealController::class);

    $router->resource('logisticscoms', LogisticsComController::class);
    $router->post('/rentclothafter/confirmOrder', 'RentClothAfterController@confirmOrder'); 
    $router->post('/rentclothafter/refund', 'RentClothAfterController@Refund'); 
    $router->resource('rent_cloth_afters', RentClothAfterController::class);

    $router->resource('present-cards', PresentCardController::class);



});
